package com.qall.util.img;

import javax.imageio.ImageIO;
import java.awt.image.BufferedImage;
import java.io.File;
import java.io.IOException;
import java.lang.reflect.Array;
import java.util.Arrays;

import static java.awt.image.BufferedImage.*;

public class ImgUtil {
    public static void main(String[] args) {
        test();
    }
     public static void test() {

        BufferedImage bufferedImage=new BufferedImage(100,100,TYPE_INT_ARGB);
        int[] rbg=new int[10000];
         Arrays.fill(rbg,50);
         bufferedImage.setRGB(0,0,100,100,rbg,0 ,100);
         bufferedImage.flush();

        try {
            ImageIO.write(bufferedImage,"jpg",new File("D:\\img\\1.jpg"));
        } catch (IOException e) {
            e.printStackTrace();
        }
    }
}
